﻿@model IEnumerable<ToWaTimeReportMVC4.Models.ProjectWrapper>

@{
    ToWaTimeReportMVC4.Models.ToWaService service = new ToWaTimeReportMVC4.Models.ToWaService();
    ToWaTimeReportMVC4.Models.User user = service.GetUserByUsername(User.Identity.Name);
    if (user != null)
    {
        if (user.Type == 0 || user.Type == 1)
        {

@section featured {
    <section class="featured">
    <div class="content-wrapper">
        <hgroup class="title">
            <h1>Customer Profile</h1>
        </hgroup>
    </div>
</section>
}

<table title="Projects" cellpadding="2">
    <tr>
        <th>Project name</th>
        <th>Description</th>
    </tr>
@{
            foreach (var item in Model)
            {
                if (item != null)
                {
            <tr>
                <td>@Html.Label(item.Name)</td>
                <td>@Html.Label(item.Description)</td>
                <td>@Html.ActionLink("View Bill", "Details", new { id = item.Id })</td>
            </tr>
                }
            }
}
</table>
        }
        else
        {
            <p>Permission denied!</p>
        }
    }
}